<div class="row">
	<div class="col-lg-12">
		<h2 class="page-header"><?php echo $title_for_layout?></h2>
	</div>
</div>
<?php echo $this->Form->create('Menus', array('class' => 'ajax_page'));?>
<table class="table table-striped table-bordered table-hover" id="dataTables-example">
	<tr>
		<th>Tên menu</th>
		<td>
			<?php
			echo $this->Form->input('mnu_name', array(
					'type' => 'text',
					'label' => false,
					'class' => 'form-control w400',
					'required' => true,
					'id'=>'mnu_name',
					'value'=>'',
					'placeholder' =>('Tên menu')
			));
			?>
		</td>
	</tr>
	<tr>
		<th>Link</th>
		<td>
			<?php
			echo $this->Form->input('mnu_link', array(
					'type' => 'text',
					'label' => false,
					'div' => false,
					'class' => 'form-control w400',
					'id'=>'mnu_link',
					'value'=>''
			)).' ';

			echo $this->Html->link('Tạo liên kết',
					array(
						'controller' => 'createLink',
						'action' => 'create',
						'mnu_link',
					),
					array(
						'onclick' => 'return false;',
						'id' => 'create_link',
						'class'=>'btn btn-primary'
					)
			);
			?>
		</td>
	</tr>
	<tr>
		<th>Menu cha</th>
		<td>
			<div class="category_type">
				<select name="data[Menus][mnu_parent_id]" id="mnu_parent_id" class="form-control">
					<option value="0">--[Menu cha]--</option>
					<?php
					foreach($list_menu as $cat):
					?>
						<option value="<?php echo $cat["id"]?>" >
						<?php
						for($j=0; $j < $cat["level"]; $j++) echo "---";
							echo $cat["mnu_name"];
						?>
						</option>
					<?php
					endforeach;
					?>
				</select>
			</div>
		</td>
	</tr>
	<tr>
		<th>Target</th>
		<td>
			<?php
			echo $this->Form->input('mnu_target', array(
					'options' => $target,
					'label' => false,
					'div' => false,
					'class' => 'form-control',
			));
			?>
		</td>
	</tr>
	<tr>
		<th>Thứ tự</th>
		<td>
			<?php
			echo $this->Form->input('mnu_order', array(
					'type' => 'text',
					'label' => false,
					'class' => 'form-control w100',
					'id'=>'mnu_order',
					'value'=>'',
			));
			?>
		</td>
	</tr>
	<tr>
		<th>&nbsp;</th>
		<td>
			<div class="form-group">
			<?php
			echo $this->Form->hidden('mnu_active', array('value' => 1));

			echo $this->Form->button('Submit', array(
					'type' => 'submit',
					'class' => 'btn btn-primary',
					'label' => false,
					'div' => false,
				)
			).'  ';

			echo $this->Form->button('Reset', array(
					'type' => 'reset',
					'class' => 'btn btn-primary',
					'label' => false,
					'div' => false,
				)
			);
			?>
			</div>
		</td>
	</tr>
</table>
<?php echo $this->Form->end()?>